cd9134e55e02bcdf4f183daf5e1c61057e72a283,src/commons/org/codehaus/groovy/grails/commons/GrailsApplicationFactoryBean.java,GrailsApplicationFactoryBean,afterPropertiesSet,#,71

Before Change


                inputStream = descriptor.getInputStream();

                // Get all the resource nodes in the descriptor.
                XPath xpath = XPathFactory.newInstance().newXPath();
                NodeList grailsClasses = (NodeList) xpath.evaluate(
                        "/grails/resources/resource",
                        new InputSource(inputStream),
                        XPathConstants.NODESET);

                // Each resource node should contain a full class name,
                // so we attempt to load them as classes.
                for (int i = 0; i < grailsClasses.getLength(); i++) {
                    Node node = grailsClasses.item(i);
                    try {
                        classes.add(classLoader.loadClass(node.getTextContent()));
                    } catch (ClassNotFoundException e) {

After Change


                // Get all the resource nodes in the descriptor.
                // Xpath: /grails/resources/resource, where root is /grails 
                GPathResult root = new XmlSlurper().parse(inputStream);
                GPathResult resources = (GPathResult) root.getProperty("resources");
                GPathResult grailsClasses = (GPathResult) resources.getProperty("resource");

                // Each resource node should contain a full class name,
                // so we attempt to load them as classes.
                for (int i = 0; i < grailsClasses.size(); i++) {
                    GPathResult node = (GPathResult) grailsClasses.getAt(i);
                    try {
                        classes.add(classLoader.loadClass(node.text()));
                    } catch (ClassNotFoundException e) {